﻿@model NavKet.Models.Item
@using NavKet.Models
@{
    ViewBag.Title = "EditShopService";
    Layout = "~/Views/Admin/AdminMasterPage.cshtml";
}
<h2>
    Edit Item</h2>
<div id="content">
    <form method="post" enctype="multipart/form-data" action="/ShopAdmin/EditItem/@Model.id?deptId=@Model.DepartmentId" >
    <table border="0" cellpadding="0" cellspacing="0" id="id-form">
        <tr>
            <th valign="top">
                Item Name:
            </th>
            <td>
                <input type="text" name="txtItemName" class="inp-form" value="@Model.name" />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <th valign="top">
                Item Price:
            </th>
            <td>
                <input type="text" name="txtPrice" class="inp-form" value="@Model.price" />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <th valign="top">
                Item Quantity:
            </th>
            <td>
                <input type="text" name="txtQuantity" class="inp-form" value="@Model.quantity" />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <th valign="top">
                Department :
            </th>
            <td>
                <select name="Department">
                    @foreach (Department item in ViewBag.ShopDepartments)
                    {
                        if (Model.DepartmentId == item.id)
                        {
                        <option selected="selected" value="@item.id">@item.name</option>     
                        }
                        else
                        {
                        <option value="@item.id">@item.name</option>     
                        }
                    }
                </select>
            </td>
        </tr>
        <tr>
            <th valign="top">
                main image
            </th>
            <td>
                <img width="50px" height="50px" src="/Content/pics/@Model.MainImage" />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <th>
                Image 1:
            </th>
            <td>
                <input type="file" name="MainImageUploader" />
            </td>
            <td>
                <div class="bubble-left">
                </div>
                <div class="bubble-inner">
                    JPEG, GIF 5MB max per image</div>
                <div class="bubble-right">
                </div>
            </td>
        </tr>
        <tr>
            <th valign="top">
                model
            </th>
            <td>
                <input type="text" name="txtModel" class="inp-form" value="@Model.model" />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <th valign="top">
                Relesed Year
            </th>
            <td>
                <input type="text" name="txtYear" class="inp-form" value="@Model.RelesedYear" />
            </td>
            <td>
            </td>
        </tr>
    </table>
    <input type="submit" class="form-submit" value="">
    <!--  startshop News-table ..................................................................................... -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
        <tr>
            <th class="table-header-repeat line-left minwidth-1">
                <a href="">Title</a>
            </th>
            <th class="table-header-repeat line-left minwidth-1">
                <a href="">Content</a>
            </th>
            <th class="table-header-options line-left">
                <a href="">Options</a>
            </th>
        </tr>
        @foreach (ItemInformation item in ViewBag.ItemInformation)
        {
            <tr>
                <td>
                    <h1>
                        @item.FeatureName
                    </h1>
                </td>
                <td>
                    <h1>
                        @item.FeatureDescretion</h1>
                </td>
                <td class="options-width">
                    <a href="/ShopAdmin/AddItemInformation?itemId=@item.ItemId" title="Add" class="icon-1 info-tooltip">
                        <a href="/ShopAdmin/EditItemInformation/@item.id" title="Edit" class="icon-1 info-tooltip">
                            <a href="/ShopAdmin/DeleteItemInformation/@item.id?itemId=@Model.id" title="Delete" class="icon-2 info-tooltip">
                            </a>
                </td>
            </tr>
        }
    </table>
    <!--  end shopNews-table................................... -->
    <!--  start image-table ..................................................................................... -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
        <tr>
            <th class="table-header-repeat line-left minwidth-1">
                <a href="">Image Name</a>
            </th>
            <th class="table-header-options line-left">
                <a href="">Options</a>
            </th>
        </tr>
        @foreach (ItemImage item in ViewBag.ItemImages)
        {
            <tr>
                <td>
                    <img width="50px" height="50px" src="/Content/pics/@item.ImgName" />
                </td>
                <td class="options-width">
                    <a href="/ShopAdmin/DeleteItemImage/@item.ImgName?itemid=@item.ItemId" title="Delete" class="icon-2 info-tooltip">
                    </a>
                </td>
            </tr>
        }
        <tr>
            <td>
                <input type="file" name="uploader" />
            </td>
            <td>
                <div class="bubble-left">
                </div>
                <div class="bubble-inner">
                    JPEG, GIF 5MB max per image</div>
                <div class="bubble-right">
                </div>
            </td>
        </tr>
    </table>
    <!--  end shopImages-table................................... -->
    </form>
</div>
